#include "DancingGoogler_Score.h"
#include <math.h>


DancingGoogler_Score::DancingGoogler_Score(int score)
{
	_score = score;
}


DancingGoogler_Score::~DancingGoogler_Score(void)
{
}

vector<array<int, 3>> DancingGoogler_Score::GetPossibleMarks()
{
	vector<array<int, 3>> result;
	int average = GetScore()/3;
	for(int i=max(0, average - 2); i<= average+2; i++)
	{
		for(int j=max(0, average - 2); j<= average+2; j++)
		{
			for(int k=max(0, average - 2); k<= average+2; k++)
			{
				if(abs(i - j) < 3 && abs(i - k) < 3 && abs(k - j) < 3 && (i+j+k) == GetScore())
				{
					array<int, 3> marks;
					marks[0] = i;
					marks[1] = j;
					marks[2] = k;
					result.push_back(marks);
				}
			}	
		}	
	}

	return result;
}

int DancingGoogler_Score::GetScore()
{
	return _score;
}